aboutsummaryrefslogtreecommitdiff
path: root/config_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'config_test.go')
-rw-r--r--config_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/config_test.go b/config_test.go
index 10422e9..3bbe7e9 100644
--- a/config_test.go
+++ b/config_test.go
@@ -27,3 +27,22 @@ packages:
assert.Equal(t, pkg, Package{Repo: "github.com/grpc/grpc-go"})
}
+
+func TestNotAlphabetical(t *testing.T) {
+ path, clean := TempFile(t, `
+
+url: google.golang.org
+packages:
+ grpc:
+ repo: github.com/grpc/grpc-go
+ atomic:
+ repo: github.com/uber-go/atomic
+
+`)
+ defer clean()
+
+ _, err := Parse(path)
+ if assert.Error(t, err, "YAML configuration is not listed alphabetically") {
+ assert.Contains(t, err.Error(), "must be alphabetically ordered")
+ }
+}