Skip to content

Commit

Permalink
dbus daemon scope fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulquinn00 committed Feb 14, 2025
1 parent ab6b135 commit 9efcf2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/rust-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ jobs:
key: custom-${{ hashFiles('**/*.nix', 'flake.lock') }}
- name: Install dbus
if: matrix.platform == 'macos-14'
run: |
brew install dbus
brew services start dbus
run: brew install dbus
- name: Print environment
run: |
uname -a
Expand Down
11 changes: 5 additions & 6 deletions orb-info/src/orb_token.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use color_eyre::eyre::{Result, WrapErr};
use orb_attest_dbus::AuthTokenManagerProxy;
use std::sync::Arc;
use tokio::sync::watch;
use tokio_util::sync::CancellationToken;
use tracing::debug;
Expand All @@ -9,10 +8,10 @@ use zbus::Connection;

use crate::OrbInfoError;

#[derive(Debug, Clone)]
#[derive(Debug)]
pub struct TokenTaskHandle {
pub token_receiver: watch::Receiver<String>,
pub join_handle: Arc<tokio::task::JoinHandle<Result<()>>>,
pub join_handle: tokio::task::JoinHandle<Result<()>>,
}

impl TokenTaskHandle {
Expand All @@ -24,7 +23,7 @@ impl TokenTaskHandle {
Self::setup_dbus(connection, cancel_token).await?;
Ok(TokenTaskHandle {
token_receiver,
join_handle: Arc::new(join_handle),
join_handle,
})
}

Expand Down Expand Up @@ -141,7 +140,7 @@ mod tests {

#[tokio::test]
async fn test_get_orb_token() -> Result<()> {
let (connection, _, mock_manager) = setup_test_server().await?;
let (connection, _daemon, mock_manager) = setup_test_server().await?;

// Create client
let cancel_token = CancellationToken::new();
Expand All @@ -160,7 +159,7 @@ mod tests {

#[tokio::test]
async fn test_token_update() -> Result<()> {
let (connection, _, mock_manager) = setup_test_server().await?;
let (connection, _daemon, mock_manager) = setup_test_server().await?;
let object_server = connection.object_server();
let iface_ref = object_server
.interface::<_, AuthTokenManagerIface>("/org/worldcoin/AuthTokenManager1")
Expand Down

0 comments on commit 9efcf2f

Please sign in to comment.