Skip to content

Commit 638cb5f

Browse files
Fixed other intergration tests failing dur to application validation
1 parent 6318b59 commit 638cb5f

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

test/integration/scan_test.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,10 +1667,8 @@ func TestScanCreate_WhenProjectExists_ShouldNotUpdateGroups(t *testing.T) {
16671667

16681668
}
16691669

1670-
func TestScanCreate_WhenProjectExists_ShouldNotUpdateApplication(t *testing.T) {
1671-
projectID, projectName := getRootProject(t)
1672-
project := showProject(t, projectID)
1673-
applicationsBeforeScanCreate := project.ApplicationIds
1670+
func TestScanCreate_WhenProjectExists_ShouldThrow_Error_ApplicationNotFound(t *testing.T) {
1671+
_, projectName := getRootProject(t)
16741672

16751673
args := []string{
16761674
scanCommand, "create",
@@ -1684,15 +1682,7 @@ func TestScanCreate_WhenProjectExists_ShouldNotUpdateApplication(t *testing.T) {
16841682
}
16851683

16861684
err, _ := executeCommand(t, args...)
1687-
if err != nil {
1688-
assertError(t, err, "running a scan should pass")
1689-
}
1690-
1691-
project = showProject(t, projectID)
1692-
applicationsAfterScanCreate := project.ApplicationIds
1693-
if !reflect.DeepEqual(applicationsBeforeScanCreate, applicationsAfterScanCreate) {
1694-
t.Errorf("When project exists, applications before and after scan creation should be equal. Got %v, want %v", applicationsAfterScanCreate, applicationsBeforeScanCreate)
1695-
}
1685+
assert.Error(t, err, "Application not found: wrong_application")
16961686

16971687
}
16981688
func TestScanCreateExploitablePath(t *testing.T) {

0 commit comments

Comments
 (0)