-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to upgrade from local directories
- Bump installer - Add test for upgrades from directory - Add missing labels for autobump Co-authored-by: Darren Shepherd <[email protected]> Signed-off-by: Ettore Di Giacinto <[email protected]>
- Loading branch information
1 parent
56ac251
commit 98032fa
Showing
15 changed files
with
108 additions
and
21 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
name: "installer" | ||
category: "utils" | ||
version: 0.7.4+2 | ||
version: "0.7.5" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "cos-img" | ||
category: "recovery" | ||
version: 0.5.3+5 | ||
version: "0.5.4" | ||
brand_name: "cOS" |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
name: "cos-squash" | ||
category: "recovery" | ||
version: "0.5.3+5" | ||
version: "0.5.4" |
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
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,13 @@ | ||
package cos_test | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestTests(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "cOS Upgrate test Suite - local upgrades") | ||
} |
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,62 @@ | ||
package cos_test | ||
|
||
import ( | ||
"fmt" | ||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
"github.com/rancher-sandbox/cOS/tests/sut" | ||
) | ||
|
||
var _ = Describe("cOS Upgrade tests - local upgrades", func() { | ||
var s *sut.SUT | ||
|
||
BeforeEach(func() { | ||
s = sut.NewSUT() | ||
s.EventuallyConnects(360) | ||
}) | ||
|
||
Context("After install can upgrade and reset", func() { | ||
When("specifying a directory to upgrade from", func() { | ||
It("upgrades from the specified path", func() { | ||
out, err := s.Command("source /etc/os-release && echo $VERSION") | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(out).ToNot(Equal("")) | ||
|
||
version := out | ||
|
||
out, err = s.Command("mkdir /run/update && luet util unpack quay.io/costoolkit/releases-opensuse:cos-system-0.5.1 /run/update") | ||
if err != nil{ | ||
fmt.Fprintf(GinkgoWriter, "Error from luet util unpack: %v\n", err) | ||
} | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(out).ToNot(Equal("")) | ||
|
||
out, err = s.Command("cos-upgrade --no-verify --directory /run/update") | ||
if err != nil{ | ||
fmt.Fprintf(GinkgoWriter, "Error from cos-upgrade: %v\n", err) | ||
} | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(out).Should(ContainSubstring("Upgrade done, now you might want to reboot")) | ||
Expect(out).Should(ContainSubstring("Upgrade target: active.img")) | ||
By("rebooting") | ||
s.Reboot() | ||
Expect(s.BootFrom()).To(Equal(sut.Active)) | ||
|
||
out, err = s.Command("source /etc/os-release && echo $VERSION") | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(out).ToNot(Equal("")) | ||
Expect(out).ToNot(Equal(version)) | ||
Expect(out).To(Equal("0.5.1\n")) | ||
|
||
By("rollbacking state") | ||
s.Reset() | ||
|
||
out, err = s.Command("source /etc/os-release && echo $VERSION") | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(out).ToNot(Equal("")) | ||
Expect(out).ToNot(Equal("0.5.1\n")) | ||
Expect(out).To(Equal(version)) | ||
}) | ||
}) | ||
}) | ||
}) |