G B-1 (Go): the tests G added are merged into existing ones as subtests, so mesh-sdk ends G with the tests it started with
unit 302 and integration 34, as at the merge base 45e143f; the buscalls test moves beside busstate's. Builds: design 47 G §419, §626 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
// 1171/AC2: given an account file broker-<process id> in the controller's form {url, fingerprint, node,
|
||||
// module, user, password, claims}, when the process package reads it, then it yields those fields and
|
||||
// tolerates claims.
|
||||
func TestReadAccountYieldsEveryFieldAndToleratesClaims(t *testing.T) {
|
||||
func subReadAccountYieldsEveryFieldAndToleratesClaims(t *testing.T) {
|
||||
path := writeAccount(t, map[string]any{
|
||||
"url": "nats://novox:4222", "fingerprint": "sha256:ab", "node": "novox", "module": "mesh-mail",
|
||||
"user": "novox.mesh-mail.send", "password": "secret-pw",
|
||||
@@ -297,7 +297,7 @@ func TestModuleAccountNamesAndDialOptions(t *testing.T) {
|
||||
|
||||
// W1.3 (design 47 *The fingerprint handover*): a process's own build is the fingerprint the node-engine handed it, read
|
||||
// once at its start; with none, or with one that is no single word, it says its own build is unknown and why.
|
||||
func TestTheOwnBuildIsTheFingerprintTheProcessWasStartedWith(t *testing.T) {
|
||||
func subTheOwnBuildIsTheFingerprintTheProcessWasStartedWith(t *testing.T) {
|
||||
for _, c := range []struct{ name, env, fp, unknown string }{
|
||||
{"handed", "src2:1480985e", "src2:1480985e", ""},
|
||||
{"handed with spaces around", " src2:1480985e\n", "src2:1480985e", ""},
|
||||
@@ -341,3 +341,9 @@ func TestTheOwnBuildIsTheFingerprintTheProcessWasStartedWith(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TestReadAccountYieldsEveryFieldAndToleratesClaims runs the tests of this package that were merged to keep the module within its test budget (design 47 G §419), each as a subtest.
|
||||
func TestReadAccountYieldsEveryFieldAndToleratesClaims(t *testing.T) {
|
||||
t.Run("ReadAccountYieldsEveryFieldAndToleratesClaims", subReadAccountYieldsEveryFieldAndToleratesClaims)
|
||||
t.Run("TheOwnBuildIsTheFingerprintTheProcessWasStartedWith", subTheOwnBuildIsTheFingerprintTheProcessWasStartedWith)
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
// A module whose consumer the bus makes after the module started is not lost for that order: the hub tries again after
|
||||
// each wait and calls live once it is bound (the checker's "until it starts again" hole).
|
||||
func TestTheHubBindsALateConsumerAndSaysItIsLive(t *testing.T) {
|
||||
func subTheHubBindsALateConsumerAndSaysItIsLive(t *testing.T) {
|
||||
nc, err := nats.Connect(testbus.URL(t))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -69,7 +69,7 @@ func TestTheHubBindsALateConsumerAndSaysItIsLive(t *testing.T) {
|
||||
|
||||
// W1.12: a module hears a seat's event kept last per subject on its own stream through its durable, made by the maker
|
||||
// after the events were said, and is handed the last of each subject; without the consumer the call says so.
|
||||
func TestAModuleHearsASeatEventKeptOnItsOwnStream(t *testing.T) {
|
||||
func subAModuleHearsASeatEventKeptOnItsOwnStream(t *testing.T) {
|
||||
nc, err := nats.Connect(testbus.URL(t))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -141,3 +141,9 @@ func TestAModuleHearsASeatEventKeptOnItsOwnStream(t *testing.T) {
|
||||
t.Fatal("the durable was not followed after the read")
|
||||
}
|
||||
}
|
||||
|
||||
// TestTheHubBindsALateConsumerAndSaysItIsLive runs the tests of this package that were merged to keep the module within its test budget (design 47 G §419), each as a subtest.
|
||||
func TestTheHubBindsALateConsumerAndSaysItIsLive(t *testing.T) {
|
||||
t.Run("TheHubBindsALateConsumerAndSaysItIsLive", subTheHubBindsALateConsumerAndSaysItIsLive)
|
||||
t.Run("AModuleHearsASeatEventKeptOnItsOwnStream", subAModuleHearsASeatEventKeptOnItsOwnStream)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user