Skip to content

Commit 93aa064

Browse files
committed
test: add unit/mocking tests for app job submission
Also add a CHANGELOG entry for this.
1 parent 663a236 commit 93aa064

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## UNRELEASED
6+
7+
### Fixed
8+
9+
* Fixed the submission of application-type jobs. (#31, #32, #33)
10+
511
## Version v0.1.4 - 2023-08-21
612

713
### Fixed

test/applications.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,19 @@ end
2222
@test JuliaHub.application(:default, "no-such-app"; throw=false) === nothing
2323
end
2424
end
25+
26+
TEST_SUBMIT_APPS = [
27+
(:default, "Pluto", JuliaHub.DefaultApp),
28+
(:package, "RegisteredPackageApp", JuliaHub.PackageApp),
29+
(:user, "ExampleApp.jl", JuliaHub.UserApp),
30+
]
31+
@testset "Submit app: :$cat / $apptype" for (cat, name, apptype) in TEST_SUBMIT_APPS
32+
Mocking.apply(mocking_patch) do
33+
app = JuliaHub.application(cat, name)
34+
@test isa(app, apptype)
35+
@test app.name == name
36+
j = JuliaHub.submit_job(app)
37+
@test j isa JuliaHub.Job
38+
@test j.status == "Completed"
39+
end
40+
end

0 commit comments

Comments
 (0)