api-test: use is for nicer errors
[?]
Apr 28, 2021, 10:27 PM
XWEWQOHVHXRAEZRIV7PZ4HKU5EEJ35SKDKHY5RPQDKSMMSIATLJQCDependencies
- [2]
GLJD3PG2api-test.t: make it work under yath - [3]
Q3VTDUSQFix the API test - [4]
UOL7YDDLFix test - [5]
TZEDUWFXapi-test: make created project and jobset visible - [6]
SYLVCTT6Start api cleanup with the User model - [7]
MIMHJSZKAdd json output for the search API endpoint - [8]
4VYSDP4IAdd eager fetching of relations and enable that for jobset->jobsetinputs - [9]
WQ2VQ7H3Use hydra-module.nix in the tests - [10]
KSFJOFICMake PathInput plugin cache validity configurable - [11]
ZIIXICG7Make the outputs' outpaths available via the Build JSON API - [12]
KYSBJAYNAllow dashes in jobset input names - [13]
5QYMALGUFix Perl error in tests.api - [14]
4YCF3KBGConcurrent hydra-evaluator - [15]
LZVO64YGMerge in the first bits of the API work - [16]
2DGIP6L4Cleanup build serialization - [17]
NP7IOJ4QFlesh out the API a bit - [18]
MQYHIUEECleanup eval serialization - [19]
7ECJWNVXCleanup Project model - [20]
MMHOJIGDTest whether incorrect passwords are rejected - [21]
YI3BZG5NCleanup Jobset serialization
Change contents
- replacement in t/api-test.t at line 54
ok($result->code() == 403, "Incorrect password rejected.");is($result->code(), 403, "Incorrect password rejected."); - replacement in t/api-test.t at line 60
ok($user->{username} eq "root", "The root user is named root");ok($user->{userroles}->[0] eq "admin", "The root user is an admin");is($user->{username}, "root", "The root user is named root");is($user->{userroles}->[0], "admin", "The root user is an admin"); - replacement in t/api-test.t at line 65
ok($user->{username} eq "root", "The current user is named root");ok($user->{userroles}->[0] eq "admin", "The current user is an admin");is($user->{username}, "root", "The current user is named root");is($user->{userroles}->[0], "admin", "The current user is an admin"); - replacement in t/api-test.t at line 68
ok(request_json({ uri => '/project/sample' })->code() == 404, "Non-existent projects don't exist");is(request_json({ uri => '/project/sample' })->code(), 404, "Non-existent projects don't exist"); - replacement in t/api-test.t at line 71
ok($result->code() == 201, "PUTting a new project creates it");is($result->code(), 201, "PUTting a new project creates it"); - replacement in t/api-test.t at line 78[3.256]→[3.38157:38220](∅→∅),[3.414]→[3.38157:38220](∅→∅),[3.526]→[3.38157:38220](∅→∅),[2.1317]→[3.38157:38220](∅→∅),[3.38157]→[3.38157:38220](∅→∅)
ok($result->code() == 201, "PUTting a new jobset creates it");is($result->code(), 201, "PUTting a new jobset creates it"); - replacement in t/api-test.t at line 84
ok($jobset->{jobsetinputs}->{"my-src"}->{"jobsetinputalts"}->[0] eq $jobsetdir, "The 'my-src' input is in $jobsetdir");is($jobset->{jobsetinputs}->{"my-src"}->{"jobsetinputalts"}->[0], $jobsetdir, "The 'my-src' input is in $jobsetdir"); - replacement in t/api-test.t at line 89
ok($result->code() == 200, "Can get evals of a jobset");is($result->code(), 200, "Can get evals of a jobset"); - replacement in t/api-test.t at line 92
ok($eval->{hasnewbuilds} == 1, "The first eval of a jobset has new builds");is($eval->{hasnewbuilds}, 1, "The first eval of a jobset has new builds"); - replacement in t/api-test.t at line 101
ok(scalar(@$evals) == 2, "Changing a jobset source creates the second evaluation");ok($evals->[0]->{jobsetevalinputs}->{"my-src"}->{revision} != $evals->[1]->{jobsetevalinputs}->{"my-src"}->{revision}, "Changing a jobset source changes its revision");is(scalar(@$evals), 2, "Changing a jobset source creates the second evaluation");isnt($evals->[0]->{jobsetevalinputs}->{"my-src"}->{revision}, $evals->[1]->{jobsetevalinputs}->{"my-src"}->{revision}, "Changing a jobset source changes its revision"); - replacement in t/api-test.t at line 105
ok($build->{job} eq "job", "The build's job name is job");ok($build->{finished} == 0, "The build isn't finished yet");is($build->{job}, "job", "The build's job name is job");is($build->{finished}, 0, "The build isn't finished yet"); - replacement in t/api-test.t at line 111
ok($search_project->{projects}[0]->{name} == "sample", "Search for project 'sample' works");is($search_project->{projects}[0]->{name}, "sample", "Search for project 'sample' works"); - replacement in t/api-test.t at line 114
ok($search_build->{builds}[0]->{buildoutputs}->{out}->{path} == $build->{buildoutputs}->{out}->{path}, "Search for builds work");is($search_build->{builds}[0]->{buildoutputs}->{out}->{path}, $build->{buildoutputs}->{out}->{path}, "Search for builds work");