Skip to content

Commit

Permalink
Merge pull request #1789 from akto-api-security/feature/crud_advanced…
Browse files Browse the repository at this point in the history
…_test_configs

Moving advanced test configs to mini testing
  • Loading branch information
Ark2307 authored Dec 2, 2024
2 parents 5cd958f + 328a413 commit bf4ab12
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.akto.dto.CollectionConditions;

import java.util.Set;

public class ConditionsType {

private String key;
private String value;
private Set<String> urlsList;


public ConditionsType () {}

public ConditionsType (String key, String value, Set<String> urlsList) {
this.key = key;
this.value = value;
this.urlsList = urlsList ;
}

public String getKey() {
return key;
}

public void setKey(String key) {
this.key = key;
}

public String getValue() {
return value;
}

public void setValue(String value) {
this.value = value;
}

public Set<String> getUrlsList() {
return urlsList;
}

public void setUrlsList(Set<String> urlsList) {
this.urlsList = urlsList;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.akto.dto.CollectionConditions;

import java.util.List;

public class TestConfigsAdvancedSettings {

private String operatorType;
private List<ConditionsType> operationsGroupList;

public TestConfigsAdvancedSettings(){}

public TestConfigsAdvancedSettings(String operatorType, List<ConditionsType> operationsGroupList){
this.operationsGroupList = operationsGroupList;
this.operatorType = operatorType;
}

public String getOperatorType() {
return operatorType;
}

public void setOperatorType(String operatorType) {
this.operatorType = operatorType;
}

public List<ConditionsType> getOperationsGroupList() {
return operationsGroupList;
}

public void setOperationsGroupList(List<ConditionsType> operationsGroupList) {
this.operationsGroupList = operationsGroupList;
}

}
11 changes: 11 additions & 0 deletions libs/dao/src/main/java/com/akto/dto/testing/TestingRunConfig.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.akto.dto.testing;

import com.akto.dto.ApiInfo;
import com.akto.dto.CollectionConditions.TestConfigsAdvancedSettings;

import org.bson.codecs.pojo.annotations.BsonId;
import org.bson.codecs.pojo.annotations.BsonIgnore;
import org.bson.types.ObjectId;
Expand All @@ -21,6 +23,8 @@ public class TestingRunConfig {

private String testRoleId;
private String overriddenTestAppUrl;

private List<TestConfigsAdvancedSettings> configsAdvancedSettings;
public TestingRunConfig() {}
public TestingRunConfig(int id, Map<Integer, List<ApiInfo.ApiInfoKey>> collectionWiseApiInfoKey,
List<String> testSubCategoryList,
Expand Down Expand Up @@ -117,4 +121,11 @@ public void setStrAuthMechanismId(String strAuthMechanismId) {
this.strAuthMechanismId = strAuthMechanismId;
}

public List<TestConfigsAdvancedSettings> getConfigsAdvancedSettings() {
return configsAdvancedSettings;
}
public void setConfigsAdvancedSettings(List<TestConfigsAdvancedSettings> configsAdvancedSettings) {
this.configsAdvancedSettings = configsAdvancedSettings;
}

}
1 change: 1 addition & 0 deletions libs/utils/src/main/java/com/akto/testing/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.akto.log.LoggerMaker;
import com.akto.log.LoggerMaker.LogDb;
import com.akto.util.JSONUtils;
import com.mongodb.BasicDBList;
import com.mongodb.BasicDBObject;

import okhttp3.MediaType;
Expand Down

0 comments on commit bf4ab12

Please sign in to comment.