Skip to content

Commit

Permalink
🔧 using the auth helpers in the remaining tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pysco68 committed Feb 28, 2024
1 parent 78d5905 commit e46a60f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 2 additions & 4 deletions test/gh-refs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <cstdlib>
#include <pre/json/to_json.hpp>
#include "utils.hpp"

int main(int argc, char** argv) {

Expand All @@ -17,10 +18,7 @@ int main(int argc, char** argv) {
std::cout << "Successfully retrieved " << refs.size() << " refs from github.com/grpc/grpc - which is a PASS" << std::endl;
});

gh::auth auth{
std::getenv("GH_USER"),
std::getenv("GH_PASS")
};
auto auth = test_utils::get_auth();

gh::get_refs("boostorg", "fusion", gh::filter_refs::TAGS, [](gh::git_data::refs&& tags) {
std::cout << pre::json::to_json(tags).dump(2) << std::endl;
Expand Down
5 changes: 1 addition & 4 deletions test/gh-repos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ int main(int argc, char** argv) {
std::cout << pre::json::to_json(r).dump(2) << std::endl;
});

gh::auth auth{
std::getenv("GH_USER"),
std::getenv("GH_PASS")
};
auto auth = test_utils::get_auth();

gh::repos_get("cpp-pre", "json", [](gh::repos::repository_t&& r) {
std::cout << pre::json::to_json(r).dump(2) << std::endl;
Expand Down

0 comments on commit e46a60f

Please sign in to comment.