diff --git a/service/lib/agama/registration.rb b/service/lib/agama/registration.rb index 208c8290ed..655dc96c1d 100644 --- a/service/lib/agama/registration.rb +++ b/service/lib/agama/registration.rb @@ -34,7 +34,9 @@ class Registration TARGET_DIR = "/run/agama/zypp" private_constant :TARGET_DIR - GLOBAL_CREDENTIALS_PATH = File.join(TARGET_DIR, + # FIXME: it should use TARGET_DIR instead of "/", but connect failed to read it even + # if fs_root passed as client params. Check with SCC guys why. + GLOBAL_CREDENTIALS_PATH = File.join("/", SUSE::Connect::YaST::GLOBAL_CREDENTIALS_FILE) private_constant :GLOBAL_CREDENTIALS_PATH diff --git a/service/test/agama/registration_test.rb b/service/test/agama/registration_test.rb index d34255c2ba..c62e258a61 100644 --- a/service/test/agama/registration_test.rb +++ b/service/test/agama/registration_test.rb @@ -90,7 +90,9 @@ it "creates credentials file" do expect(SUSE::Connect::YaST).to receive(:create_credentials_file) - .with("test-user", "12345", "/run/agama/zypp/etc/zypp/credentials.d/SCCcredentials") + .with("test-user", "12345", "/etc/zypp/credentials.d/SCCcredentials") + # TODO: when fixing suse-connect read of fsroot + # .with("test-user", "12345", "/run/agama/zypp/etc/zypp/credentials.d/SCCcredentials") subject.register("11112222", email: "test@test.com") end