@@ -517,7 +517,7 @@ public void testValidKanikoOptions() {
517517 .withNewDockerOutput ()
518518 .withImage ("my-image:latest" )
519519 .withPushSecret ("my-docker-credentials" )
520- .withAdditionalKanikoOptions ("--reproducible" , "--single-snapshot" , "--log-format=json" )
520+ .withAdditionalBuildOptions ("--reproducible" , "--single-snapshot" , "--log-format=json" )
521521 .endDockerOutput ()
522522 .endBuild ()
523523 .endSpec ()
@@ -536,7 +536,7 @@ public void testInvalidKanikoOptions() {
536536 .withNewDockerOutput ()
537537 .withImage ("my-image:latest" )
538538 .withPushSecret ("my-docker-credentials" )
539- .withAdditionalKanikoOptions ("--reproducible" , "--reproducible-something" , "--build-arg" , "--single-snapshot" , "--digest-file=/dev/null" , "--log-format=json" )
539+ .withAdditionalBuildOptions ("--reproducible" , "--reproducible-something" , "--build-arg" , "--single-snapshot" , "--digest-file=/dev/null" , "--log-format=json" )
540540 .endDockerOutput ()
541541 .endBuild ()
542542 .endSpec ()
@@ -546,7 +546,7 @@ public void testInvalidKanikoOptions() {
546546 KafkaConnectBuild .fromCrd (new Reconciliation ("test" , "KafkaConnect" , NAMESPACE , NAME ), kc , VERSIONS , SHARED_ENV_PROVIDER , false )
547547 );
548548
549- assertThat (e .getMessage (), containsString (".spec.build.output.additionalKanikoOptions contains forbidden options: [--reproducible-something, --build-arg, --digest-file]" ));
549+ assertThat (e .getMessage (), containsString (".spec.build.output.additionalBuildOptions contains forbidden options: [--reproducible-something, --build-arg, --digest-file]" ));
550550 }
551551
552552 @ Test
@@ -618,31 +618,6 @@ public void testInvalidBuildahPushOptions() {
618618 assertThat (e .getMessage (), containsString (".spec.build.output.additionalPushOptions contains forbidden options: [--digestfile, --sign-by, --format]" ));
619619 }
620620
621- @ Test
622- public void testKanikoAdditionalOptionsConfiguredOnBothPlaces () {
623- List <String > expectedArgs = new ArrayList <>(EXPECTED_DEFAULT_KANIKO_OPTIONS );
624- expectedArgs .add ("--single-snapshot" );
625- expectedArgs .add ("--log-format=json" );
626-
627- KafkaConnect kc = new KafkaConnectBuilder (RESOURCE )
628- .editSpec ()
629- .editBuild ()
630- .withNewDockerOutput ()
631- .withImage ("my-image:latest" )
632- .withPushSecret ("my-docker-credentials" )
633- .withAdditionalKanikoOptions ("--reproducible" )
634- .withAdditionalBuildOptions ("--single-snapshot" , "--log-format=json" )
635- .endDockerOutput ()
636- .endBuild ()
637- .endSpec ()
638- .build ();
639- KafkaConnectBuild build = KafkaConnectBuild .fromCrd (new Reconciliation ("test" , "KafkaConnect" , NAMESPACE , NAME ), kc , VERSIONS , SHARED_ENV_PROVIDER , false );
640-
641- Pod pod = build .generateBuilderPod (true , false , ImagePullPolicy .IFNOTPRESENT , null , "cf065b80ede090aa" );
642- assertThat (pod .getSpec ().getContainers ().get (0 ).getArgs (), is (expectedArgs ));
643- assertThat (pod .getSpec ().getContainers ().get (0 ).getArgs ().contains ("--reproducible" ), is (false ));
644- }
645-
646621 @ Test
647622 public void testInvalidKanikoOptionsInAdditionalBuildOptions () {
648623 KafkaConnect kc = new KafkaConnectBuilder (RESOURCE )
0 commit comments