Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CYB-201] [UI][COMPONENT] Fix Karma unit test. #69

Merged
merged 26 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
04c0b1a
[CYB-201] [UI][COMPONENT] Multiple choice button.
vpavlenko-cv Feb 28, 2024
481db7b
[CYB-201] [UI][COMPONENT] Multiple choice button.
vpavlenko-cv Feb 28, 2024
08fd7c8
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 14, 2024
749158d
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 14, 2024
fdde9d6
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 14, 2024
e534ea5
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 14, 2024
c57ac3b
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 18, 2024
7bdcddf
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 19, 2024
edcafdd
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 19, 2024
0fb1291
Merge branch 'develop' into CYB-201
vpavlenko-cv Mar 20, 2024
51dedb0
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 20, 2024
20f0f92
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 20, 2024
88e9bb4
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 21, 2024
33e5316
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 22, 2024
bc185cb
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 28, 2024
1abeec2
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Mar 29, 2024
bd3998f
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 1, 2024
08683de
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 1, 2024
b4e9bd7
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 3, 2024
7adf1b7
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 8, 2024
77c9321
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 10, 2024
0c81581
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 10, 2024
12bea2d
fix merge conflicts.
vpavlenko-cv Apr 16, 2024
0176c63
fixes after merge
vpavlenko-cv Apr 16, 2024
b66aaca
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 18, 2024
3a451e1
[CYB-201] [UI][COMPONENT] Fixed Karma Unit tests.
vpavlenko-cv Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,26 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Build and Test with Maven
run: mvn -B package --file flink-cyber/pom.xml
run: mvn -P '!add-depebdencies-for-IDEA,!full-build,!include-front-end' -B package --file flink-cyber/pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
uses: advanced-security/maven-dependency-submission-action@v3
with:
directory: /home/runner/work/cybersec/cybersec/flink-cyber
build_and_test_angular:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Install dependencies
run: npm install
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client
- name: Run test
run: npm run test:headless
working-directory: ./flink-cyber/metron-parser-chain/parser-chains-config-service/frontend/parser-chains-client
10 changes: 10 additions & 0 deletions flink-cyber/flink-commands/json-commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@
<version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need new dependencies here?


</dependencies>

Expand Down
5 changes: 5 additions & 0 deletions flink-cyber/flink-commands/scoring-commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
<artifactId>scoring-commands</artifactId>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${flink.version}</version>
</dependency>
vpavlenko-cv marked this conversation as resolved.
Show resolved Hide resolved
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.util.StringUtils;

@Data
@NoArgsConstructor
Expand Down Expand Up @@ -43,12 +42,15 @@ public String getRawKafkaName(){
}

public String getPath() {
return StringUtils.hasText(path)
? (path.equals(".") ? "" : path)
: "extensions";
if (path == null || path.isEmpty()) {
return "extensions";
} else if (path.equals(".")) {
return "";
}
return path;
vpavlenko-cv marked this conversation as resolved.
Show resolved Hide resolved
}

public Boolean getIsMap() {
public boolean getIsMap() {
return isMap == null ? path == null : isMap;
}
}
4 changes: 4 additions & 0 deletions flink-cyber/flink-profiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
<groupId>org.apache.flink</groupId>
<artifactId>flink-avro</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need guava here?

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,44 @@
"ignorePatterns": [
"projects/**/*"
],
"rules": {
"valid-jsdoc" : "off"
},
"overrides": [
{

"files": ["*.actions.ts"],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "class",
"format": ["PascalCase"],
"custom": {
"regex": "Action$",
"match": true
}
}
]
}
},
{
"files": [
"*.ts"
],
"excludedFiles": ["*.actions.ts", "*.spec.ts"],
"parserOptions": {
"project": [
"tsconfig.json",
Expand All @@ -16,10 +49,64 @@
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"jsdoc/check-alignment": "off",
"jsdoc/check-param-names": "off",
"@typescript-eslint/adjacent-overload-signatures": "off",
"jsdoc/newline-after-description": "off",
"eslint-plugin/require-meta-fixable": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/prefer-enum-initializers": "off",
"indent": "off",
"simple-import-sort/imports": "off",
"array-bracket-spacing": "off",
"no-underscore-dangle": "off",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "objectLiteralProperty",
"format": null
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
},
{
"selector": "classProperty",
"modifiers": ["static"],
"format": ["UPPER_CASE"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "memberLike",
"format": ["camelCase"],
"leadingUnderscore": "forbid"
},
{
"selector": "memberLike",
"modifiers": ["private"],
"format": ["camelCase"],
"leadingUnderscore": "require"
}
],
"@angular-eslint/component-selector": [
"error",
{
Expand All @@ -36,7 +123,7 @@
"type": "attribute"
}
],
"@angular-eslint/no-empty-lifecycle-method": "off"
"@angular-eslint/no-empty-lifecycle-method": "error"
}
},
{
Expand All @@ -46,7 +133,53 @@
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
"rules": {
"@angular-eslint/template/no-negated-async": "warn",
"@angular-eslint/template/eqeqeq": "off"
}
},
{
"files": [
"*.spec.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"plugins": [
"jasmine"
],
"extends": [
"plugin:jasmine/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"simple-import-sort/imports": "off",
"jasmine/new-line-before-expect": "off",
"@typescript-eslint/naming-convention": "off",
"jasmine/no-unsafe-spy": "off",
"no-restricted-globals": [
"error",
"event"
],
"@typescript-eslint/no-shadow": "warn",
"no-underscore-dangle": "off",
"no-useless-escape": "off",
"@angular-eslint/prefer-on-push-component-change-detection": "off",
"jasmine/prefer-toHaveBeenCalledWith": "off",
"jasmine/no-spec-dupes": [
"error",
"branch"
],
"jasmine/no-suite-dupes": [
"error",
"branch"
],
"jasmine/no-global-setup": "off"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
{
"glob": "**/*",
"input": "node_modules/ngx-monaco-editor-v2",
"output": "/assets/monaco-editor/"
"output": "/assets/monaco-editor/min"
}
]
}
Expand Down Expand Up @@ -239,5 +239,6 @@
}
}
}
}
},
"defaultProject": "parser-chaining"
}
Loading
Loading