UNCLASSIFIED - NO CUI

Skip to content

Updater Util Library

Ryan Daily requested to merge 194-updater-util-library into main

General MR

Summary

Adds GitLab client and unit tests for future use in update check command

Relevant logs/screenshots

Includes 100% unit test coverage on new client library

 bbctl (194-updater-util-library) ✗ go test ./util/gitlab -v --coverprofile=cover.txt
=== RUN   TestGetValidFile
--- PASS: TestGetValidFile (0.00s)
=== RUN   TestGetFileNotFound
--- PASS: TestGetFileNotFound (0.00s)
=== RUN   TestGetFileEncodingError
--- PASS: TestGetFileEncodingError (0.00s)
=== RUN   TestGetClient
--- PASS: TestGetClient (0.00s)
=== RUN   TestGetBadClientURL
--- PASS: TestGetBadClientURL (0.00s)
PASS
coverage: 100.0% of statements
ok  	repo1.dso.mil/big-bang/product/packages/bbctl/util/gitlab	0.347s	coverage: 100.0% of statements

Linked Issue

#194 (closed)

Upgrade Notices

New config values were added to the BBCTL config structure under the top level gitlab field. Token can be an empty string for now since we are not pulling from any private repositories for the update check functionality. ex:

...
"bbctl-log-format": "text"
"gitlab":
    "base-url": "https://repo1.dso.mil"
    "access-token": ""

Closes #194 (closed)

Merge request reports

Loading