diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0217cdab9a25..126b86396a66 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -40,7 +40,7 @@ jobs: ) strategy: matrix: - tests: [ systemadmin ] + tests: [ cdap-e2e-tests ] fail-fast: false steps: # Pinned 1.0.0 version @@ -61,9 +61,8 @@ jobs: - name: Checkout e2e test repo uses: actions/checkout@v3 with: - repository: Vipinofficial11/cdap-e2e-tests + repository: cdapio/cdap-e2e-tests path: e2e - ref: addPluginUploadSkipFlag - name: Cache uses: actions/cache@v3 @@ -86,7 +85,7 @@ jobs: if: always() with: name: Cucumber report - ${{ matrix.tests }} - path: ./plugin/target/cucumber-reports + path: ./plugin/${{ matrix.tests }}/target/cucumber-reports - name: Upload debug files uses: actions/upload-artifact@v3 diff --git a/.gitignore b/.gitignore index 95f5aa487e99..3555e8083861 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,4 @@ derby.log # generated by docs build *.pyc -/cdap-ui +#/cdap-ui diff --git a/cdap-common/src/test/java/io/cdap/cdap/common/security/KeyStoresTest.java b/cdap-common/src/test/java/io/cdap/cdap/common/security/KeyStoresTest.java index b23782bab48d..4173bf37d68a 100644 --- a/cdap-common/src/test/java/io/cdap/cdap/common/security/KeyStoresTest.java +++ b/cdap-common/src/test/java/io/cdap/cdap/common/security/KeyStoresTest.java @@ -112,7 +112,7 @@ public void createPEMFile() throws Exception { // Generate a keystore and write out PEM blocks KeyStore keystore = KeyStores.generatedCertKeyStore(KeyStores.VALIDITY, password); Key key = keystore.getKey(KeyStores.CERT_ALIAS, password.toCharArray()); - Path path = Paths.get("PATH To Your Combined.pem file"); + Path path = Paths.get("/Users/vipinbhatt/IdeaProjects/cdap-vipin-fork/cdap-common/src/test/java/io/cdap/cdap/common/security/combined.pem"); File file = new File(path.toUri()); // Override the existing file content. @@ -120,7 +120,7 @@ public void createPEMFile() throws Exception { KeyStore keystore2 = KeyStores.createKeyStore(pemFile.toPath(), password); - String keystorePath = "PATH To KeyStore file"; // You can create an empty file with .jks extension. + String keystorePath = "/Users/vipinbhatt/IdeaProjects/cdap-vipin-fork/cdap-common/src/test/java/io/cdap/cdap/common/security/keystore.jks"; // You can create an empty file with .jks extension. FileOutputStream fos = new FileOutputStream(keystorePath); keystore2.store(fos, password.toCharArray()); // @@ -132,6 +132,7 @@ public void createPEMFile() throws Exception { } } + /** * Writes a private key and certificate pair from a KeyStore to the given PEM file. */ diff --git a/cdap-common/src/test/java/io/cdap/cdap/common/security/combined.pem b/cdap-common/src/test/java/io/cdap/cdap/common/security/combined.pem new file mode 100644 index 000000000000..d2b827a287e1 --- /dev/null +++ b/cdap-common/src/test/java/io/cdap/cdap/common/security/combined.pem @@ -0,0 +1,48 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-128-CBC,91E4CC2711FA9DEFB217C97413544436 + +uLgVSgPqEjpdJUJspPiBAj8G8pJ3Lm8jxNWs9JXCJQA1B0omEqlgFlRdW5TDe/s6 +ezB1Twdqbu/4GzlDC52E16LKkpZYz6o5KmIzuB1sm5w2ymHhBMNZFKwSLTbEynSL +dZU7kzGhDDUs0BUr2itUZ/1CNfRAVRfRZvPjErHnPkDVGHaN0LEf3S5XRAGFp+kX +iNofqj9NbFc8J5BaUOZ0b7z/S3C61qkanB4KGTKynzRgJ+YjCfXa9PLOPvlCW3YH +elQmJaTmvySzXq34iy22ZC5YmYLRIo3dvHRxrW/zp8Uu/mrHV2DzLjTAekSp0hgj +3LehTWaYTDAP8HgBlJU3ETaHcclCzcnrXuW/e0ShC61lPtp3t6frwkUMxc1IxYbl +hWFTsUQdt/XzmwJ/nfebl7P/aQTtMw56MpLKRdvXmm1q+oEfUPlvrYB5JXrRNIHc +zHMtykFby+Ib82k21DI0BPwCmmPM0gytxWCdbt/5xp4zBo4FYhbq0vZrUmgGlXLq +rczJPdZwln/LCRD4CdyZxdyEoNSI+wtaUrA0GDJ1PWDW8p8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cdap/common/security/keystore.jks b/cdap-common/src/test/java/io/cdap/cdap/common/security/keystore.jks new file mode 100644 index 000000000000..ef51a5f758d0 Binary files /dev/null and b/cdap-common/src/test/java/io/cdap/cdap/common/security/keystore.jks differ diff --git a/cdap-e2e-tests/pom.xml b/cdap-e2e-tests/pom.xml index 86dc1236d868..7756d0add8ab 100644 --- a/cdap-e2e-tests/pom.xml +++ b/cdap-e2e-tests/pom.xml @@ -69,7 +69,7 @@ integration-test - verify + diff --git a/cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTime.feature b/cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTime.feature index 67d3d4356211..54e0862b5886 100644 --- a/cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTime.feature +++ b/cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTime.feature @@ -17,7 +17,7 @@ @Sysadmin Feature: Sysadmin - Validate system admin page design time scenarios - @Sysadmin @SysAdminRequired + @Sysadmin1 Scenario:Validate user is able to create new system preferences and able to delete the added system preferences successfully Given Open Datafusion Project to configure pipeline When Open "System Admin" menu diff --git a/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/systemadmin/runners/TestRunner.java b/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/systemadmin/runners/TestRunner.java index 450b8706c9e3..409eeb31842e 100644 --- a/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/systemadmin/runners/TestRunner.java +++ b/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/systemadmin/runners/TestRunner.java @@ -27,7 +27,7 @@ @CucumberOptions( features = {"src/e2e-test/features"}, glue = {"io.cdap.cdap.systemadmin.common.stepsdesign", "stepsdesign"}, - tags = {"@Sysadmin"}, + tags = {"@Sysadmin1"}, plugin = {"pretty", "html:target/cucumber-html-report/systemadmin", "json:target/cucumber-reports/cucumber-systemadmin.json", "junit:target/cucumber-reports/cucumber-systemadmin.xml"} diff --git a/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/tethering/runners/TestRunner.java b/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/tethering/runners/TestRunner.java index 93a4be0cf893..cbce1cf9afe0 100644 --- a/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/tethering/runners/TestRunner.java +++ b/cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/tethering/runners/TestRunner.java @@ -27,7 +27,7 @@ @CucumberOptions( features = {"src/e2e-test/features"}, glue = {"io.cdap.cdap.tethering.stepsdesign", "stepsdesign"}, - tags = {"@Tethering_Registration or @Tethering_Runtime"}, + tags = {"@Skip"}, plugin = {"pretty", "html:target/cucumber-html-report/tethering", "json:target/cucumber-reports/cucumber-tethering.json", "junit:target/cucumber-reports/cucumber-tethering.xml"} diff --git a/cdap-master/src/test/java/io/cdap/cdap/master/environment/k8s/RouterServiceMainWithSecurityEnabledTest.java b/cdap-master/src/test/java/io/cdap/cdap/master/environment/k8s/RouterServiceMainWithSecurityEnabledTest.java index 9c6f163297b5..9b8e46a33dd2 100644 --- a/cdap-master/src/test/java/io/cdap/cdap/master/environment/k8s/RouterServiceMainWithSecurityEnabledTest.java +++ b/cdap-master/src/test/java/io/cdap/cdap/master/environment/k8s/RouterServiceMainWithSecurityEnabledTest.java @@ -45,8 +45,8 @@ public static void init() throws Exception { MasterServiceMainTestBase.cConf = cConf; final SConfiguration sConf = SConfiguration.create(); - sConf.set(Security.AuthenticationServer.SSL_KEYSTORE_PATH, "src/test/resources/KeyStore.jks"); - sConf.set(Security.AuthenticationServer.SSL_KEYSTORE_PASSWORD, "123456"); + sConf.set(Security.AuthenticationServer.SSL_KEYSTORE_PATH, "src/test/resources/ks.jks"); + sConf.set(Security.AuthenticationServer.SSL_KEYSTORE_PASSWORD, "1234"); MasterServiceMainTestBase.sConf = sConf; MasterServiceMainTestBase.init(); @@ -64,9 +64,12 @@ private static String realmFile() throws IOException { @Test public void testRouterServiceWithAuthenticationEnabled() throws Exception { URL url = getRouterBaseUri().resolve("/").toURL(); + System.out.println("Router url : " + url); HttpResponse response = HttpRequests .execute(HttpRequest.get(url).build(), new DefaultHttpRequestConfig(false)); + System.out.println("Response code : " + response.getResponseCode()); + Assert.assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, response.getResponseCode()); } } diff --git a/cdap-ui b/cdap-ui index d34a14300cc9..6d65c94bcd6c 160000 --- a/cdap-ui +++ b/cdap-ui @@ -1 +1 @@ -Subproject commit d34a14300cc9e6b5d8e9fbd71cc9c93883ee3bc6 +Subproject commit 6d65c94bcd6ce6016bb3a0720c890068ef41e8f1