Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Separate Create Config Handler #1272

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ probes:
followRedirects: 0
alerts:
- assertion: response.status != 302
message: You should not follow redirect
message: You should not follow the redirect
- id: 'should follow redirect with default config'
requests:
- url: http://localhost:3000/absolute-redirect/20
alerts:
- assertion: response.status == 302
message: You are not follow redirect
- id: 'should follow redirect with customize config'
message: You are not following the redirect
- id: 'should follow redirect with customized config'
requests:
- url: http://localhost:3000/status/302
followRedirects: 2
alerts:
- assertion: response.status == 302
message: You are not follow redirect
message: You are not following the redirect
```

##### MariaDB
Expand Down
5 changes: 3 additions & 2 deletions src/commands/monika.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import pEvent from 'p-event'
import type { Config } from '../interfaces/config'
import type { Probe } from '../interfaces/probe'

import { createConfig, getConfig, isSymonModeFrom } from '../components/config'
import { getConfig, isSymonModeFrom } from '../components/config'
import { createConfig } from '../components/config/create'
import { sortProbes } from '../components/config/sort'
import { printAllLogs } from '../components/logger'
import { flush } from '../components/logger/flush'
Expand Down Expand Up @@ -350,7 +351,7 @@ export default class Monika extends Command {

try {
if (_flags['create-config']) {
await createConfig(_flags)
await createConfig()
return
}

Expand Down
240 changes: 0 additions & 240 deletions src/components/config/__tests__/create-config.test.ts

This file was deleted.

Loading
Loading