You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1: update section on .env file to reference .env-example and
match contents of .env-example
2: Included information from ./build/ci/README.md in top level README.md
and delete the file.
3: reword sections to avoid use of "you" and "your"
4: add information on yast test
SUSEConnect-ng is distributed as RPM for all SUSE distributions and gets built in
12
12
the [openSUSE build service](https://build.opensuse.org/package/show/systemsmanagement:SCC/suseconnect-ng).
13
13
14
-
Please visit https://scc.suse.com to see and manage your subscriptions.
14
+
Please visit https://scc.suse.com to view and manage subscriptions.
15
15
16
16
SUSEConnect-ng communicates with SCC over this [REST API](https://github.com/SUSE/connect/blob/master/doc/SCC-API-%28Implemented%29.md).
17
17
@@ -24,30 +24,75 @@ make build
24
24
This will create a `out/suseconnect` binary.
25
25
26
26
### Build in container
27
-
If you don't have a go compiler installed, you can run the build in a container:
27
+
If the local system does not have a go compiler installed, the build can be done in a container:
28
28
```
29
29
docker run --rm -v $(pwd):/connect registry.suse.com/bci/golang:1.21-openssl sh -c "git config --global --add safe.directory /connect; cd /connect; make build"
30
30
```
31
31
This will create a `out/suseconnect` binary on the host.
32
32
33
33
### Testing
34
+
Pull requests must pass CI testing to be approved. These tests can be run locally before the PR is created. There are three sets of CI tests:
35
+
* Format, unit, and build tests
36
+
* Feature tests
37
+
* Yast tests
34
38
35
-
You can run all unit tests by running `make test`. If you then want to run unit
36
-
tests for a specific package, you can simply run it as you would do for any Go
39
+
#### Unit Tests
40
+
Users can run all unit tests by running `make test`. Unit
41
+
tests for a specific package can be run it as for any Go
37
42
project, for example: `go test ./internal/collectors/`.
38
43
39
-
For feature tests you first need to create an `.env` file in the root directory
40
-
of the project with the following contents:
44
+
#### Format Test
45
+
Users can run the go format test by running `make check-format`
46
+
47
+
#### Feature Tests
48
+
49
+
Feature tests require an `.env` file in the root directory
50
+
of the project. There is an .env-example; copy .env-example to .env and update the following entries.
41
51
42
52
```sh
43
-
BETA_VALID_REGCODE="<regcode>"
44
-
BETA_NOT_ACTIVATED_REGCODE="<regcode>"
45
-
VALID_REGCODE="<regcode>"
46
-
EXPIRED_REGCODE="<regcode>"
47
-
NOT_ACTIVATED_REGCODE="<regcode>"
53
+
REGCODE=
54
+
HA_REGCODE=
55
+
EXPIRED_REGCODE=
56
+
48
57
```
49
58
50
59
These values can be picked up from Glue's production environment. Once that is
51
-
done, you can then simply run `make feature-tests`. This will run a all feature
60
+
done, run `make feature-tests`. This will run all feature
52
61
tests inside of a container by using the registration codes as provided by the
53
62
`.env` file.
63
+
64
+
**Running Featre tests in a container**
65
+
66
+
The Feture tests can be run using the official SUSE Golang container:
0 commit comments