| 66 | { |
| 67 | protected: |
| 68 | void setBasicHttpAuthenticator( |
| 69 | const string& realm, |
| 70 | const Credentials& credentials) |
| 71 | { |
| 72 | Try<process::http::authentication::Authenticator*> authenticator = |
| 73 | BasicAuthenticatorFactory::create(realm, credentials); |
| 74 | |
| 75 | ASSERT_SOME(authenticator); |
| 76 | |
| 77 | // Add this realm to the set of realms which will be unset during teardown. |
| 78 | realms.insert(realm); |
| 79 | |
| 80 | // Pass ownership of the authenticator to libprocess. |
| 81 | AWAIT_READY(setAuthenticator( |
| 82 | realm, |
| 83 | Owned<process::http::authentication::Authenticator>( |
| 84 | authenticator.get()))); |
| 85 | } |
| 86 | |
| 87 | void TearDown() override |
| 88 | { |
nothing calls this directly
no test coverage detected