25 lines
733 B
Go
25 lines
733 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/novox/mesh-controller/internal/chain"
|
|
)
|
|
|
|
// 1146: a merge's ask that failed is kept under an id the bus takes as a key, for a module at the repository's root
|
|
// (".") as for one in a folder.
|
|
func TestTheIdOfABuildNotAskedIsAKeyTheBusTakes(t *testing.T) {
|
|
for dir, want := range map[string]string{
|
|
".": "not-asked-0177ea7a",
|
|
"modules/mesh-delivery-view": "not-asked-0177ea7a-modules-mesh-delivery-view",
|
|
} {
|
|
id := notAskedID("0177ea7a00000000", dir)
|
|
if id != want {
|
|
t.Errorf("notAskedID(%q) = %q, want %q", dir, id, want)
|
|
}
|
|
if !chain.ValidKey("req." + id) {
|
|
t.Errorf("notAskedID(%q) = %q: the bus takes no key req.%s", dir, id, id)
|
|
}
|
|
}
|
|
}
|