-
Notifications
You must be signed in to change notification settings - Fork 0
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 expiration date to vouchers #477
base: development
Are you sure you want to change the base?
Conversation
c7d4a22
to
60893dd
Compare
76b07ee
to
67fd8ff
Compare
@@ -73,23 +72,35 @@ func SetUp(t testing.TB) *App { | |||
`, dbPath) | |||
|
|||
err := os.WriteFile(configPath, []byte(config), 0644) | |||
assert.NoError(t, err) | |||
if !assert.NoError(t, err) { |
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.
You can use assert.error
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.
assert changes the state of the testing object t, fa if I used assert.Error so every time the err = nil (meaning the test had bassed), the t object would report that the test failed
server/deployer/k8s_deployer.go
Outdated
@@ -154,6 +155,7 @@ func (d *Deployer) loadK8s(k8sDeployInput models.K8sDeployInput, userID string, | |||
ClusterContract: int(k8sContractID), | |||
Master: master, | |||
Workers: workers, | |||
ExpirationDate: time.Now().Add(time.Duration(k8sDeployInput.Duration) * 30 * 24 * time.Hour).Truncate(24 * time.Hour), |
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.
why using hours?
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.
there's no time.Month duration const to use it directly, max is time.Hour fa I use it to get a month
Description
add expiration date to vouchers
Related Issues