Skip to content

Commit

Permalink
fix:bug: linting for test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
howard-oc committed May 2, 2024
1 parent af207dd commit 3d3edb7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
8 changes: 1 addition & 7 deletions .env
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@


BASE_INSTANCE="$WORKSPACE/resources/minimal-flinkdep-manifest.yaml"

DEPENDENCIES_DIR="$WORKSPACE/dependencies"

RESOURCES_DIR="$WORKSPACE/resources"

KRATIX_INPUT="$WORKSPACE/tests/test-input"

KRATIX_OUTPUT="$WORKSPACE/tests/test-output"
RESOURCES_DIR="$WORKSPACE/resources"
3 changes: 2 additions & 1 deletion .github/linters/.checkov.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
skip-check:
- CKV_DOCKER_2
- CKV2_GHA_1
- CKV2_GHA_1
13 changes: 7 additions & 6 deletions .github/linters/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
failure-threshold: warning
format: tty
ignored:
- DL3045
- DL3018
- DL3045
- DL3018
trustedRegistries:
- docker.io
- ghcr.io
- "*.gcr.io"
- quay.io
- docker.io
- ghcr.io
- "*.gcr.io"
- quay.io
6 changes: 4 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ jobs:
env:
DEFAULT_BRANCH: main
VALIDATE_KUBERNETES_KUBECONFORM: false
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_RUST_2015: false
VALIDATE_RUST_2018: false
VALIDATE_RUST_2021: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 8 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
name: Rust

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pub mod pipeline;
pub mod promise;
use crate::pipeline::PipelineConfig;
use dotenv::dotenv;
use log;

use std::{
env,
process,
Expand Down Expand Up @@ -40,15 +40,15 @@ pub fn run_pipeline() -> PipelineConfig {

impl ResourceRequest for MyPromise {
fn transform(&self, _conf: &PipelineConfig) -> String {
format!("{}", self.params)
self.params.to_string()
}
}

let request = MyPromise {
params: String::from("(default)"),
};

return run_custom_pipeline(Some(request));
run_custom_pipeline(Some(request))
}

pub fn run_custom_pipeline(_request: Option<impl ResourceRequest>) -> PipelineConfig {
Expand Down Expand Up @@ -125,7 +125,7 @@ pub fn run_custom_pipeline(_request: Option<impl ResourceRequest>) -> PipelineCo
//pipeline::list_files_recursively(_kratix_output_dir);

log::debug!("<- End Pipeline ->");
return config;
config
}

// validation function
Expand Down

0 comments on commit 3d3edb7

Please sign in to comment.