Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Oct 2012 at 16:38 UTC
Updated:
29 Jul 2014 at 21:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
vijaycs85Comment #2
alexpottYou need to set the mac_key in openid_test.install
There's no point doing the conditional here... should just be
$association->mac_key = state()->get('mac_key');Comment #3
vijaycs85Thanks for your comment. I don't see "openid_test_mac_key" that defined in openid_test.install used anywhere. So replacing it with "mac_key".
Comment #4
alexpottAlso the state key should be namespaced... so it should be
openid_test.mac_keyComment #5
alexpottIt's interesting that the tests works without a mac_key... this should be investigated too.
Comment #6
luksakI replaced the state key.
What should I do to investigate the testing issue?
Comment #8
luksakI had the wrong Git config...
Comment #10
luksakThe tests seem to be broken. Initially there were thwo variable names
mac_keyandopenid_test_mac_key. And we are converting both of them toopenid_test.mac_key. Is this correct? Also, We are not converting a set. This can't have the correct result in the tests.Comment #11
vijaycs85Keeping existing openid_test_mac_key as it is.
Comment #12
vijaycs85Lukas you are right. Its not failing if I don't change the
openid_test_mac_keyI don't find any other instant of this variable anywhere other than install. Not sure why it is causing issue. But this is good to go with what we have at #11.Comment #13
cameron tod commentedLooks good to me!
Comment #14
alexpottLets not perpetuate this bug...
+++ b/core/modules/openid/tests/openid_test.installundefined
@@ -13,5 +13,5 @@ function openid_test_install() {
// Generate a MAC key (Message Authentication Code) used for signing messages.
// The variable is base64-encoded, because variables cannot contain non-UTF-8
// data.
- variable_set('openid_test_mac_key', base64_encode(_openid_get_bytes(20)));
+ state()->set('openid_test_mac_key', base64_encode(_openid_get_bytes(20)));
The .install file and variable/state key is completely unnecessary as it is in never actually used!
How about this patch...
Comment #15
vijaycs85+1 to Alex patch... we don't use it anyway.
Comment #16
cameron tod commentedTaking code out is always better than putting code in :)
Comment #17
catchHeh nice find, let's kill it. Committed/pushed to 8.x.
Comment #19
vijaycs85