56 Commits

Author SHA1 Message Date
sophia
7eccedba12
Add test for box with 0 version number 2022-04-25 12:26:45 -05:00
sophia
fc649b0937
Set first match without version constraint 2022-04-25 12:26:45 -05:00
sophia
8bd9a778e9
Test for non merging configs 2022-04-25 12:26:34 -05:00
sophia
34c4bac2ec
Don't merge Vagrantfile configs when merging targets to upsert to db 2022-04-25 12:26:34 -05:00
sophia
3dbd9286be
Merge targets with upserting 2022-04-25 12:26:23 -05:00
Paul Hinze
c1c215e84e
Round out service tests
* Add tests for service Target and catch a panic
 * Add skipped stub test for Task w/ a note for future us
2022-04-25 12:26:11 -05:00
Paul Hinze
72c72c4f53
Test for server config service
Pretty simple stuff. Also renaming file to match service name
2022-04-25 12:26:11 -05:00
Paul Hinze
e7533103e8
Tests for service project & a small panic guard
Tests helped flush out that we would panic if a project was attempting
to be created without a basis.

Sometimes tests help!
2022-04-25 12:26:11 -05:00
sophia
eddc9d916e
Return empty result when deleting target 2022-04-25 12:26:11 -05:00
Paul Hinze
3df9c55a5c
Service box tests
Continuing with the error messages audit, this service came out the same
as the basis one - I haven't yet found any tests I can write that
expose errors we would want to enhance. In the meantime, more tests are
good though!
2022-04-25 12:26:03 -05:00
Paul Hinze
61d2c80813
Tests for the basis service
Filling these out as a part of a sweep to ensure we return decent error
messages from our GRPC services.

For this service I didn't come up with any error condition that
warranted changing the code yet. The get -> notfound case seems to be
the main one and the pass through error object seems AOK here.
2022-04-25 12:26:03 -05:00
sophia
7aaeaf2e46
Update protos 2022-04-25 12:25:57 -05:00
sophia
a63184ef5f
Test target find and duplicate upserts 2022-04-25 12:25:55 -05:00
sophia
04095d2132
Find targets based on name and project 2022-04-25 12:25:55 -05:00
sophia
eeafbe4954
Search for project and target before upserting 2022-04-25 12:25:55 -05:00
sophia
a99bfc65f9
AUse version constraints to find boxes 2022-04-25 12:25:54 -05:00
sophia
e77cb42171
Add tests 2022-04-25 12:25:54 -05:00
sophia
9d01b2c60e
Add endpoint for finding boxes 2022-04-25 12:25:54 -05:00
sophia
63eb76bd60
Find boxes by name, provider, version 2022-04-25 12:25:54 -05:00
sophia
62d7324bfc
go generate 2022-04-25 12:25:52 -05:00
sophia
a8ce240049
Add tests for box 2022-04-25 12:25:52 -05:00
sophia
5fc9dd94fe
Implement box crub endpoints 2022-04-25 12:25:52 -05:00
sophia
3e3ab869d4
Add box to bolt 2022-04-25 12:25:52 -05:00
sophia
d75f76edf7
Prune old jobs as part of vagrant server clean ups 2022-04-25 12:24:40 -05:00
sophia
57474ac8c8
Periodically prune old jobs from bolt 2022-04-25 12:24:40 -05:00
sophia
2991810e0c
Seperate pruning jobs from memdb and bolt
only prune out old queued jobs in memdb
2022-04-25 12:24:40 -05:00
sophia
21c926523f
Count all the entries in jobs bucket 2022-04-25 12:24:40 -05:00
sophia
63dcc9fbf3
Save point: run prune in background 2022-04-25 12:24:40 -05:00
sophia
4205d0e444
Prune old jobs from state 2022-04-25 12:24:40 -05:00
sophia
772e786eee
Import Waypoint state pruning code
ref: b333b059a0/internal/server/singleprocess/state/prune.go
b333b059a0/internal/server/singleprocess/state/prune_test.go
4f71748610/internal/server/singleprocess/prune.go

Squash: import prune
2022-04-25 12:24:40 -05:00
sophia
f5fe88de15
Add tests for target 2022-04-25 12:24:39 -05:00
sophia
72225abc28
Add test for basis state 2022-04-25 12:24:39 -05:00
sophia
b30bbcb13a
Don't check for 'found' in basis/project/target query results 2022-04-25 12:24:39 -05:00
sophia
ea87b6824d
Upgrade bolt to bbolt
boltdb/bolt is no longer a maintained project. bbolt is the CoreOS
fork that the author of boltdb suggests using as a replacement.
2022-04-25 12:24:34 -05:00
Chris Roberts
df2488e508
Set uuid value on target if unset 2022-04-25 12:24:32 -05:00
Chris Roberts
097c4547db
Support target lookups via uuid 2022-04-25 12:24:31 -05:00
sophia
ea313d1291
Implement service endpoint to delete target 2022-04-25 12:24:25 -05:00
Chris Roberts
e9c3494778
Remove path requirement from basis and project in state 2022-04-25 12:24:23 -05:00
sophia
f5fa1f330a
Seperate target name and project into their own keys for target index 2022-04-25 12:24:20 -05:00
sophia
1832fd9f53
Remove vagrantfile service in Vagrant server 2022-04-25 12:24:19 -05:00
sophia
eeb7028a48
Building after rebase 2022-04-25 12:24:19 -05:00
sophia
3f9b933991
Return dummy Vagrantfile data 2022-04-25 12:24:16 -05:00
sophia
45e86d7f8a
Setup Vagrantfile service 2022-04-25 12:24:16 -05:00
sophia
45e1564a81
Remove unused code 2022-04-25 12:24:15 -05:00
sophia
8b0f7d8658
Fix runner and snapshot tests 2022-04-25 12:24:15 -05:00
sophia
86dfcefad5
Fix project test 2022-04-25 12:24:15 -05:00
sophia
3de668b821
Sort out job test except for blocking job execution tests 2022-04-25 12:24:15 -05:00
sophia
1b4891317c
Fix config test 2022-04-25 12:24:15 -05:00
sophia
bb83e4aa46
Clean up service runner tests 2022-04-25 12:24:15 -05:00
sophia
cdb77936fa
Provide default basis info 2022-04-25 12:24:15 -05:00