File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Tests/ContainerRegistryTests Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -121,14 +121,21 @@ struct ReferenceTests {
121121 ]
122122
123123 @Test ( arguments: tests)
124- func testReferences ( test: ReferenceTestCase ) throws {
124+ func testValidReferences ( test: ReferenceTestCase ) throws {
125125 let parsed = try ! ImageReference ( fromString: test. reference, defaultRegistry: " default " )
126126 #expect(
127127 parsed == test. expected,
128128 " \( String ( reflecting: parsed) ) is not equal to \( String ( reflecting: test. expected) ) "
129129 )
130130 }
131131
132+ @Test
133+ func testInvalidReferences( ) throws {
134+ #expect( throws: ImageReference . RepositoryParseError. emptyString) {
135+ try ImageReference ( fromString: " " , defaultRegistry: " default " )
136+ }
137+ }
138+
132139 @Test
133140 func testLibraryReferences( ) throws {
134141 // docker.io is a special case, as references such as "swift:slim" with no registry component are translated to "docker.io/library/swift:slim"
You can’t perform that action at this time.
0 commit comments