Commit Graph
7 Commits
Author SHA1 Message Date
Wez Furlong eb6232f582 Add basic suspension of scheduled and ready queues
These are two different groups of queues, so there are two different
sets of things to manage them.

kcli now has `suspend(-list|cancel)?` and
`suspend-ready-q(-list|cancel)?` subcommands for establishing a
suspension, listing the suspensions and cancelling a suspension
in the scheduled-q and ready-q namespaces respectively.

The names of the ready queues can be derived from the metrics API:

```console
$ curl -s 'http://localhost:8000/metrics.json'  | jq .
...
  "ready_count": {
    "help": "number of messages in the ready queue",
    "type": "gauge",
    "value": {
      "service": {
        "smtp_client:source2->(in1-smtp|in2-smtp).messagingengine.com": 0.0
      }
    }
  },
...
```

From the above, `source2->(in1-smtp|in2-smtp).messagingengine.com` is
the name of the underlying ready queue.

We can and probably should add something to `kcli` to make that slightly
easier to review and manage for the operator.

refs: https://github.com/KumoCorp/kumomta/issues/51
2023-06-23 07:50:56 -07:00
Wez Furlong 51b72a8399 add selene linter config
This is relatively basic in that it can catch general lua lints,
but doesn't know about the set of functions available to kumo.

It doesn't appear as though selene is able to be extended to
know about those yet; that is tracked by
https://github.com/Kampfkarren/selene/issues/520

I've fixed the couple of lints in our policy and test files
as part of this commit.

You can install and run it like this:

```console
$ cargo install selene
```

Then:

```console
$ selene .
```
2023-06-22 13:50:51 -07:00
Wez Furlong f6ded18a96 add integration tests for smtp auth
refs: https://github.com/KumoCorp/kumomta/issues/10
2023-05-15 17:38:17 -07:00
Wez Furlong 713d46e6a8 tests: add end-to-end webhook test
This exercises the log -> webhook delivery path

refs: https://github.com/KumoCorp/kumomta/issues/36
refs: https://github.com/KumoCorp/kumomta/issues/18
2023-05-08 10:14:34 -07:00
Wez Furlong c7860fa93f add temp and perm fail integration tests 2023-03-08 16:53:03 -07:00
Wez Furlong 6e15132be0 more tweaks to integration tests
trying to figure out why they hang on GH actions
2023-03-07 22:07:28 -07:00
Wez Furlong 257dc4a25a flesh out integration testing some more
This has our first end-to-end integration test that validates
smtp -> source mta -> sink mta -> maildir
and confirms that the message has the right bits inside it.

The end to end test will get refactored into more easily usable
pieces in follow-up commit(s).
2023-03-07 18:42:14 -07:00