| 1096 | return pf_create_rejects(&in, guard) && ok; |
| 1097 | } |
| 1098 | static bool pf_invalid_create(pf_fixture_t *f, cbm_pipeline_frozen_t *guard) { |
| 1099 | cbm_git_context_t git = pf_git(f); |
| 1100 | cbm_pipeline_frozen_inputs_t in = pf_inputs(f, "{}", &git, NULL); |
| 1101 | bool ok = pf_wide_oid_control(f) && pf_required_context_fields(f, guard); |
| 1102 | in.project = "bad/project"; |
| 1103 | ok = pf_create_rejects(&in, guard) && ok; |
| 1104 | in.project = PF_PROJECT; |
| 1105 | git.head_sha = "abc"; |
| 1106 | ok = pf_create_rejects(&in, guard) && ok; |
| 1107 | git.head_sha = "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"; |
| 1108 | ok = pf_create_rejects(&in, guard) && ok; /* Full but different OID widths. */ |
| 1109 | git.head_sha = PF_H; |
| 1110 | git.branch = ""; |
| 1111 | ok = pf_create_rejects(&in, guard) && ok; |
| 1112 | git.branch = "frozen-branch"; |
| 1113 | char long_path[4097]; |
| 1114 | memset(long_path, 'x', 4096); |
| 1115 | long_path[0] = '/'; |
| 1116 | long_path[4096] = '\0'; |
| 1117 | in.source_root = long_path; |
| 1118 | ok = pf_create_rejects(&in, guard) && ok; |
| 1119 | in.source_root = f->source; |
| 1120 | return pf_create_rejects(NULL, guard) && |
| 1121 | cbm_pipeline_frozen_create(&in, NULL) == CBM_PIPELINE_FROZEN_INVALID && ok; |
| 1122 | } |
| 1123 | static bool pf_unsupported_create(pf_fixture_t *f, cbm_pipeline_frozen_t *guard) { |
| 1124 | const char *configs[] = { |
| 1125 | "{\"test_impact\":{\"version\":1,\"tests\":{\"conventions\":[{" |
no test coverage detected