-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(core): add tests to verify the rosco startup with various cloud …
…providers enabled Adding tests for AWS, Azure, Docker, Google and Oracle cloud providers to verify the rosco startup with these providers enabled.
- Loading branch information
Showing
6 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
rosco-core/src/test/java/com/netflix/spinnaker/rosco/providers/aws/AWSStartupTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2024 OpsMx, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.rosco.providers.aws; | ||
|
||
import com.netflix.spinnaker.rosco.Main; | ||
import com.netflix.spinnaker.rosco.providers.aws.config.RoscoAWSConfiguration; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.TestPropertySource; | ||
import org.springframework.test.context.junit.jupiter.SpringExtension; | ||
|
||
@ExtendWith(SpringExtension.class) | ||
@SpringBootTest(classes = {Main.class}) | ||
@TestPropertySource( | ||
properties = { | ||
"spring.application.name=rosco", | ||
"aws.enabled=true", | ||
"rosco.config-dir=/some/path", | ||
"bakeAccount=xyz" | ||
}) | ||
public class AWSStartupTest { | ||
|
||
@Autowired AWSBakeHandler awsBakeHandler; | ||
|
||
@Autowired RoscoAWSConfiguration.AWSBakeryDefaults awsBakeryDefaults; | ||
|
||
@Test | ||
public void startupTest() {} | ||
} |
46 changes: 46 additions & 0 deletions
46
rosco-core/src/test/java/com/netflix/spinnaker/rosco/providers/azure/AzureStartupTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2024 OpsMx, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.rosco.providers.azure; | ||
|
||
import com.netflix.spinnaker.rosco.Main; | ||
import com.netflix.spinnaker.rosco.providers.azure.config.RoscoAzureConfiguration; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.TestPropertySource; | ||
import org.springframework.test.context.junit.jupiter.SpringExtension; | ||
|
||
@ExtendWith(SpringExtension.class) | ||
@SpringBootTest(classes = {Main.class}) | ||
@TestPropertySource( | ||
properties = { | ||
"spring.application.name=rosco", | ||
"azure.enabled=true", | ||
"rosco.config-dir=/some/path" | ||
}) | ||
public class AzureStartupTest { | ||
|
||
@Autowired AzureBakeHandler azureBakeHandler; | ||
|
||
@Autowired RoscoAzureConfiguration.AzureBakeryDefaults azureBakeryDefaults; | ||
|
||
@Autowired RoscoAzureConfiguration.AzureConfigurationProperties azureConfigurationProperties; | ||
|
||
@Test | ||
public void startupTest() {} | ||
} |
44 changes: 44 additions & 0 deletions
44
rosco-core/src/test/java/com/netflix/spinnaker/rosco/providers/docker/DockerStartupTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2024 OpsMx, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.rosco.providers.docker; | ||
|
||
import com.netflix.spinnaker.rosco.Main; | ||
import com.netflix.spinnaker.rosco.providers.docker.config.RoscoDockerConfiguration; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.TestPropertySource; | ||
import org.springframework.test.context.junit.jupiter.SpringExtension; | ||
|
||
@ExtendWith(SpringExtension.class) | ||
@SpringBootTest(classes = {Main.class}) | ||
@TestPropertySource( | ||
properties = { | ||
"spring.application.name=rosco", | ||
"docker.enabled=true", | ||
"rosco.config-dir=/some/path" | ||
}) | ||
public class DockerStartupTest { | ||
|
||
@Autowired DockerBakeHandler dockerBakeHandler; | ||
|
||
@Autowired RoscoDockerConfiguration.DockerBakeryDefaults dockerBakeryDefaults; | ||
|
||
@Test | ||
public void startupTest() {} | ||
} |
46 changes: 46 additions & 0 deletions
46
rosco-core/src/test/java/com/netflix/spinnaker/rosco/providers/google/GCEStartupTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2024 OpsMx, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.rosco.providers.google; | ||
|
||
import com.netflix.spinnaker.rosco.Main; | ||
import com.netflix.spinnaker.rosco.providers.google.config.RoscoGoogleConfiguration; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.TestPropertySource; | ||
import org.springframework.test.context.junit.jupiter.SpringExtension; | ||
|
||
@ExtendWith(SpringExtension.class) | ||
@SpringBootTest(classes = {Main.class}) | ||
@TestPropertySource( | ||
properties = { | ||
"spring.application.name=rosco", | ||
"google.enabled=true", | ||
"rosco.config-dir=/some/path" | ||
}) | ||
public class GCEStartupTest { | ||
|
||
@Autowired GCEBakeHandler gceBakeHandler; | ||
|
||
@Autowired RoscoGoogleConfiguration.GCEBakeryDefaults gceBakeryDefaults; | ||
|
||
@Autowired RoscoGoogleConfiguration.GoogleConfigurationProperties googleConfigurationProperties; | ||
|
||
@Test | ||
public void startupTest() {} | ||
} |
47 changes: 47 additions & 0 deletions
47
rosco-core/src/test/java/com/netflix/spinnaker/rosco/providers/oracle/OracleStartupTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2024 OpsMx, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.netflix.spinnaker.rosco.providers.oracle; | ||
|
||
import com.netflix.spinnaker.rosco.Main; | ||
import com.netflix.spinnaker.rosco.providers.oracle.config.OracleBakeryDefaults; | ||
import com.netflix.spinnaker.rosco.providers.oracle.config.OracleConfigurationProperties; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.context.TestPropertySource; | ||
import org.springframework.test.context.junit.jupiter.SpringExtension; | ||
|
||
@ExtendWith(SpringExtension.class) | ||
@SpringBootTest(classes = {Main.class}) | ||
@TestPropertySource( | ||
properties = { | ||
"spring.application.name=rosco", | ||
"oracle.enabled=true", | ||
"rosco.config-dir=/some/path" | ||
}) | ||
public class OracleStartupTest { | ||
|
||
@Autowired OCIBakeHandler ociBakeHandler; | ||
|
||
@Autowired OracleBakeryDefaults oracleBakeryDefaults; | ||
|
||
@Autowired OracleConfigurationProperties oracleConfigurationProperties; | ||
|
||
@Test | ||
public void startupTest() {} | ||
} |