-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1062 from dprince/csvEpochVersion
OpenStackVersion: Add releaseVersionScheme and csvVersionAppend support
- Loading branch information
Showing
6 changed files
with
90 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package v1beta1 | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
var _ = Describe("OpenStackReleaseVersion", func() { | ||
|
||
Context("test interal getOpenStackReleaseVersion", func() { | ||
|
||
// NOTE: this is the default behavior where OPENSTACK_RELEASE_VERSION is just an environment variable | ||
// and enables the clearest understanding of the version number with regards to testing upgrades | ||
It("Generates a default version based on the OPENSTACK_RELEASE_VERSION when no mode is set", func() { | ||
Expect( | ||
getOpenStackReleaseVersion("1.2.3", "", "openstack-operator.v1.0.0-0.1724144685.p"), | ||
).To(Equal("1.2.3")) | ||
|
||
}) | ||
|
||
It("Generates a default version based on the OPENSTACK_RELEASE_VERSION when invalid mode is set", func() { | ||
Expect( | ||
getOpenStackReleaseVersion("1.2.3", "asdf", "openstack-operator.v1.0.0-0.1724144685.p"), | ||
).To(Equal("1.2.3")) | ||
|
||
}) | ||
|
||
// NOTE: this is what some downstream projects use for custom release automation | ||
// Will envolve extra understanding of the version number when testing upgrades with regards to how the | ||
// epoch gets appended | ||
It("Generates a version which appends the epoch when csvEpochAppend is enabled", func() { | ||
Expect( | ||
getOpenStackReleaseVersion("1.2.3", "csvEpochAppend", "openstack-operator.v1.0.0-0.1234567890.p"), | ||
).To(Equal("1.2.3.1234567890.p")) | ||
|
||
}) | ||
|
||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters