Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2771

ModelControllerClient operations don't fail on invalid username/password

XMLWordPrintable

      Running org.jboss.as.test.smoke.jsr88.EnterpriseDeploymentTestCase
      Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 128.98 sec

      There should be a test failure with this

          @Test
          public void testListAvailableModulesUnauthorized() throws Exception {
              DeploymentManager manager = getDeploymentManager("nobody", "nopass");
              Target[] targets = manager.getTargets();
              // [TODO] This should fail already
              TargetModuleID[] availableModules = manager.getAvailableModules(ModuleType.EAR, targets);
              assertNull(availableModules);
      
              ProgressObject progress = jsr88Deploy(manager, getEarArchive());
              TargetModuleID[] targetModules = progress.getResultTargetModuleIDs();
              try {
                  availableModules = manager.getAvailableModules(ModuleType.EAR, targets);
                  assertNotNull(availableModules);
                  assertEquals(1, availableModules.length);
      
                  TargetModuleID targetModuleID = availableModules[0];
                  String moduleID = targetModuleID.getModuleID();
                  assertTrue("Ends with deployment-app.ear", moduleID.endsWith("deployment-app.ear"));
      
                  // [TODO] verify child modules
      
              } finally {
                  jsr88Undeploy(manager, targetModules);
              }
          }
      

              darran.lofthouse@redhat.com Darran Lofthouse
              tdiesler@redhat.com Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: