aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/repository')
-rw-r--r--crates/shirabe/src/repository/vcs/github_driver.rs12
-rw-r--r--crates/shirabe/src/repository/vcs/gitlab_driver.rs12
2 files changed, 24 insertions, 0 deletions
diff --git a/crates/shirabe/src/repository/vcs/github_driver.rs b/crates/shirabe/src/repository/vcs/github_driver.rs
index bea7294..7c50a7e 100644
--- a/crates/shirabe/src/repository/vcs/github_driver.rs
+++ b/crates/shirabe/src/repository/vcs/github_driver.rs
@@ -1298,6 +1298,18 @@ impl GitHubDriver {
None
}
+
+ /// For testing only. Mirrors the `setAttribute($driver, 'tags', ...)` reflection
+ /// helper used by GitHubDriverTest to seed private state.
+ pub fn __set_tags(&mut self, tags: Option<IndexMap<String, String>>) {
+ self.tags = tags;
+ }
+
+ /// For testing only. Mirrors the `setAttribute($driver, 'branches', ...)` reflection
+ /// helper used by GitHubDriverTest to seed private state.
+ pub fn __set_branches(&mut self, branches: Option<IndexMap<String, String>>) {
+ self.branches = branches;
+ }
}
impl crate::repository::vcs::VcsDriverInterface for GitHubDriver {
diff --git a/crates/shirabe/src/repository/vcs/gitlab_driver.rs b/crates/shirabe/src/repository/vcs/gitlab_driver.rs
index f1f361e..7e8073d 100644
--- a/crates/shirabe/src/repository/vcs/gitlab_driver.rs
+++ b/crates/shirabe/src/repository/vcs/gitlab_driver.rs
@@ -238,6 +238,18 @@ impl GitLabDriver {
Ok(())
}
+ /// For testing only. Mirrors the `setAttribute($driver, 'branches', ...)` reflection
+ /// helper used by GitLabDriverTest to seed private state.
+ pub fn __set_branches(&mut self, branches: Option<IndexMap<String, String>>) {
+ self.branches = branches;
+ }
+
+ /// For testing only. Mirrors the `setAttribute($driver, 'tags', ...)` reflection
+ /// helper used by GitLabDriverTest to seed private state.
+ pub fn __set_tags(&mut self, tags: Option<IndexMap<String, String>>) {
+ self.tags = tags;
+ }
+
/// Updates the HttpDownloader instance.
/// Mainly useful for tests.
///