-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pv support #109
Add pv support #109
Conversation
| Field | Description | | ||
| --- | --- | | ||
| `name` _string_ | (Required) The name of the PersistentVolumeClaim. | | ||
| `spec` _[PersistentVolumeClaimSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#persistentvolumeclaimspec-v1-core)_ | (Required) PersistentVolumeClaimSpec is the specification of a persistent volume. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the links seem not valid.
We had better make another issue.
Could you add PV and PVC properties to existing tests in |
Thanks for the review! |
@@ -84,5 +86,99 @@ var _ = Context("Inside of a new namespace", func() { | |||
Expect(job.Spec.Completions).Should(Equal(pointer.Int32Ptr(2))) | |||
}) | |||
|
|||
It("shoud create a New Gatling resource with PersistentVolume resources", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shoud -> should
ctx, client.ObjectKey{Namespace: ns.Name, Name: "resource-pvc"}, pvc) | ||
}).Should(Succeed()) | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question.
Are the below codes needed here?
Expect(job.Spec.Parallelism).Should(Equal(pointer.Int32Ptr(1)))
Expect(job.Spec.Completions).Should(Equal(pointer.Int32Ptr(1)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the code confirms that the results of getGatlingRunnerJobParallelism are correct, we consider it unnecessary in the added test code. Of course, it can be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked that the sample scenario works according to the steps outlined below.
This is evidence.
Defaulted container "gatling-runner" out of: gatling-runner, gatling-result-transferer, gatling-waiter (init)
Wait until 2024-03-26 01:35:28
GATLING_HOME is set to /opt/gatling
01:35:33.930 [WARN ] i.g.c.ZincCompiler$ - -target is deprecated: Use -release instead to compile against the correct platform API.
01:35:39.234 [WARN ] i.g.c.ZincCompiler$ - one warning found
Mar 26, 2024 1:35:41 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Gatling 3.10.5 is available! (you're using 3.9.5)
Simulation PersistentVolumeSampleSimulation started...
User 1 is buying goods 1 hoge
myresource: a
User 2 is buying goods 2 fuga
myresource: b
User 3 is buying goods 3 sample
myresource: c
User 4 is buying goods 4 test
myresource: a
User 5 is buying goods 5 goods
myresource: b
User 1 is buying goods 1 hoge
myresource: c
User 2 is buying goods 2 fuga
myresource: a
User 3 is buying goods 3 sample
myresource: b
User 4 is buying goods 4 test
myresource: c
User 5 is buying goods 5 goods
myresource: a
User 1 is buying goods 1 hoge
myresource: b
================================================================================
2024-03-26 01:35:49 5s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
---- Scenario Name -------------------------------------------------------------
[#################################-------- ] 45%
waiting: 9 / active: 2 / done: 9
================================================================================
User 2 is buying goods 2 fuga
myresource: c
User 3 is buying goods 3 sample
myresource: a
User 4 is buying goods 4 test
myresource: b
User 5 is buying goods 5 goods
myresource: c
User 1 is buying goods 1 hoge
myresource: a
User 2 is buying goods 2 fuga
myresource: b
User 3 is buying goods 3 sample
myresource: c
User 4 is buying goods 4 test
myresource: a
User 5 is buying goods 5 goods
myresource: b
================================================================================
2024-03-26 01:35:54 10s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
---- Scenario Name -------------------------------------------------------------
[######################################################################----] 95%
waiting: 0 / active: 1 / done: 19
================================================================================
================================================================================
2024-03-26 01:35:54 10s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
---- Scenario Name -------------------------------------------------------------
[##########################################################################]100%
waiting: 0 / active: 0 / done: 20
================================================================================
Simulation PersistentVolumeSampleSimulation completed in 10 seconds
Description
Provide a description of what has been changed
Checklist
Please check if applicable
Relevant issue #