Skip to content

Commit 883fa82

Browse files
committed
tests and QL test
1 parent a8eeb6f commit 883fa82

File tree

3 files changed

+39
-33
lines changed

3 files changed

+39
-33
lines changed

.github/workflows/import_test.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@ jobs:
1616
- name: Import app .py files
1717
run: |
1818
echo cd src/main/resources/scripts
19-
echo try: > test.py
20-
echo import archive_extract_reports >> test.py
21-
echo import cobertura >> test.py
22-
echo import copy_build_dir >> test.py
23-
echo import create_index_html >> test.py
24-
echo import extract_build_dir >> test.py
25-
echo import fixup_reports >> test.py
26-
echo import full_report_no_toc >> test.py
27-
echo import importlib >> test.py
28-
echo generate_results = importlib.import_module\("generate-results"\) >> test.py
29-
echo import generate_lcov >> test.py
30-
echo import generate_pclp_reports >> test.py
31-
echo import generate_qa_results_xml >> test.py
32-
echo import generate_sonarqube_pclp_reports >> test.py
33-
echo import generate_sonarqube_testresults >> test.py
34-
echo import generate_xml >> test.py
35-
echo import getjobs >> test.py
36-
echo import incremental_build_report_aggregator >> test.py
37-
echo import managewait >> test.py
38-
echo import merge_vcr >> test.py
39-
echo import parallel_full_reports >> test.py
40-
echo import parse_console_for_cbt >> test.py
41-
echo import parse_traceback >> test.py
42-
echo import patch_rgw_directory >> test.py
43-
echo import prevcast_parallel_build_execute >> test.py
44-
echo import safe_open >> test.py
45-
echo import tcmr2csv >> test.py
46-
echo import tee_print >> test.py
47-
echo import vcastcsv2jenkins >> test.py
48-
echo import vcast_exec >> test.py
49-
echo import vcast_utils >> test.py
19+
echo "try:" > test.py
20+
echo " import archive_extract_reports" >> test.py
21+
echo " import cobertura" >> test.py
22+
echo " import copy_build_dir " >> test.py
23+
echo " import create_index_html " >> test.py
24+
echo " import extract_build_dir " >> test.py
25+
echo " import fixup_reports " >> test.py
26+
echo " import full_report_no_toc " >> test.py
27+
echo " import importlib " >> test.py
28+
echo " generate_results = importlib.import_module(\"generate-results\") " >> test.py
29+
echo " import generate_lcov " >> test.py
30+
echo " import generate_pclp_reports " >> test.py
31+
echo " import generate_qa_results_xml" >> test.py
32+
echo " import generate_sonarqube_pclp_reports" >> test.py
33+
echo " import generate_sonarqube_testresults" >> test.py
34+
echo " import generate_xml" >> test.py
35+
echo " import getjobs" >> test.py
36+
echo " import incremental_build_report_aggregator" >> test.py
37+
echo " import managewait" >> test.py
38+
echo " import merge_vcr" >> test.py
39+
echo " import parallel_full_reports" >> test.py
40+
echo " import parse_console_for_cbt " >> test.py
41+
echo " import parse_traceback " >> test.py
42+
echo " import patch_rgw_directory " >> test.py
43+
echo " import prevcast_parallel_build_execute " >> test.py
44+
echo " import safe_open " >> test.py
45+
echo " import tcmr2csv " >> test.py
46+
echo " import tee_print " >> test.py
47+
echo " import vcastcsv2jenkins " >> test.py
48+
echo " import vcast_exec " >> test.py
49+
echo " import vcast_utils " >> test.py
5050
echo except: >> test.py
51-
echo sys.exit\(-1\) >> test.py
51+
echo " sys.exit(-1) " >> test.py
5252
5353
python3 test.py

src/main/java/com/vectorcast/plugins/vectorcastexecution/job/BaseJob.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
import java.util.ArrayList;
6363

6464
import java.net.URL;
65-
65+
import org.kohsuke.stapler.verb.POST;
66+
import org.springframework.web.bind.annotation.RequestMapping;
67+
import org.springframework.web.bind.annotation.RequestMethod;
6668

6769
/**
6870
* Base job management - create/delete/update.
@@ -707,6 +709,7 @@ protected void addDelWSBeforeBuild(final Project<?, ?> project) {
707709
* @throws JobAlreadyExistsException exception
708710
* @throws InvalidProjectFileException exception
709711
*/
712+
@POST
710713
public void create()
711714
throws IOException, ServletException,
712715
Descriptor.FormException,
@@ -768,6 +771,7 @@ public void create()
768771
* @throws hudson.model.Descriptor.FormException exception
769772
* @throws InvalidProjectFileException exception
770773
*/
774+
@RequestMapping(value="/create", method=RequestMethod.POST)
771775
protected abstract void doCreate()
772776
throws IOException,
773777
ServletException,

src/main/java/com/vectorcast/plugins/vectorcastexecution/job/NewPipelineJob.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
import java.nio.file.StandardCopyOption;
7373

7474
import java.util.EnumSet;
75+
import org.kohsuke.stapler.verb.POST;
7576

7677
/**
7778
* Create a new single job.
@@ -325,6 +326,7 @@ public void doCreate()
325326
* @throws JobAlreadyExistsException exception
326327
* @throws InvalidProjectFileException exception
327328
*/
329+
@POST
328330
@Override
329331
public void create()
330332
throws IOException, ServletException, Descriptor.FormException,

0 commit comments

Comments
 (0)