WQYAGTX3RIB4PW6WZC7FDW3FNXMOJ4HTRGZMB4OVDWGPUKDSK2GAC ZDH6UX5UH4HJHJ5QWVDB7235BOC5LHQ3LFEWLHZQRZAS2YME5UVAC OOQ2D3KCLFPYNAN253PHWLBQMB6OMO2KYQWQXLTP65SQAYZWQ5LAC 3HZY24CX4U2TO74HOY4YX3LBJIYF4DLXHCIY7J2RASAC4COMSMZAC ODNCGFQ5FPKFI624BVMLW7PJ2EFJOR3TY66OCZM42UNNTWBCF2TQC QUMWPGCUBMAPWLUPRSISK7PNU5LIHKHKCAZYE4XXQCJ5E4L74VSQC ZCTQCN3EQDFYIKRKM3SJIGLTZ6QVKNPCIR3V6CRZ3W4PP2V2YQ2AC error($c, "Invalid input name ‘$name’.") unless $name =~ /^[[:alpha:]][\w-]*$/;error($c, "Invalid input type ‘$type’.") unless defined $c->stash->{inputTypes}->{$type};
badRequest($c, "Invalid input name ‘$name’.") unless $name =~ /^[[:alpha:]][\w-]*$/;badRequest($c, "Invalid input type ‘$type’; valid types: $types.") unless defined $c->stash->{inputTypes}->{$type};
};subtest 'Update jobset "job" to have an invalid input type' => sub {my $jobsetupdate = request(PUT '/jobset/tests/job',Accept => 'application/json',Content_Type => 'application/json',Cookie => $cookie,Content => encode_json({enabled => 3,visible => JSON::true,name => "job",type => 0,nixexprinput => "ofborg",nixexprpath => "release.nix",inputs => {ofborg => {name => "ofborg",type => "123",value => "https://github.com/NixOS/ofborg.git released"}},description => "test jobset",checkinterval => 0,schedulingshares => 50,keepnr => 1}));ok(!$jobsetupdate->is_success);ok($jobsetupdate->content =~ m/Invalid input type.*valid types:/);