You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
h.AssertContains(t, readStdout(), "Warning: The following keys declared in project.toml are not supported in schema version 0.1:\nWarning: - unsupported-table\nWarning: - unsupported-table.unsupported-key\nWarning: The above keys will be ignored. If this is not intentional, maybe try updating your schema version.\n")
430
+
h.AssertContains(t, readStdout(), "Warning: The following keys declared in project.toml are not supported in schema version 0.1:\nWarning: - project.authors\nWarning: - io.buildpacks.build.env\nWarning: - io.buildpacks.build.env.name\nWarning: - io.buildpacks.build.env.value\nWarning: The above keys will be ignored. If this is not intentional, maybe try updating your schema version.\n")
421
431
})
422
432
423
-
it("should warn when unsupported keys are declared with schema v0.2", func() {
433
+
it("should warn when unsupported keys, on tables the project owns, are declared with schema v0.2", func() {
424
434
projectToml:=`
425
435
[_]
426
436
schema-version = "0.2"
437
+
# typo in a key under valid table - warning message expected
438
+
versions = "0.1"
439
+
440
+
[[_.licenses]]
441
+
type = "foo"
442
+
# invalid key under a valid table - warning message expected
443
+
foo = "bar"
444
+
445
+
# try to use an invalid key under io.buildpacks - warning message expected
446
+
[[io.buildpacks.build.foo]]
447
+
name = "something"
448
+
449
+
# something else defined by end-users - no warning message expected
450
+
[io.docker]
451
+
file = "./Dockerfile"
452
+
453
+
# some metadata defined the end-user - no warning message expected
454
+
[_.metadata]
455
+
foo = "bar"
427
456
428
-
[unsupported-table]
429
-
unsupported-key = "some value"
457
+
# more metadata defined the end-user - no warning message expected
h.AssertContains(t, readStdout(), "Warning: The following keys declared in project.toml are not supported in schema version 0.2:\nWarning: - unsupported-table\nWarning: - unsupported-table.unsupported-key\nWarning: The above keys will be ignored. If this is not intentional, maybe try updating your schema version.\n")
469
+
// Assert we only warn
470
+
h.AssertContains(t, readStdout(), "Warning: The following keys declared in project.toml are not supported in schema version 0.2:\nWarning: - _.versions\nWarning: - _.licenses.foo\nWarning: - io.buildpacks.build.foo\nWarning: - io.buildpacks.build.foo.name\nWarning: The above keys will be ignored. If this is not intentional, maybe try updating your schema version.\n")
0 commit comments