This message was deleted.
# general
s
This message was deleted.
w
pulumi preview
doesn't seem to have any problem with this when i instantiate BucketPolicy — it's just the test that seems to have trouble resolving the output
w
Interesting. At first, I thought this was due to https://github.com/pulumi/pulumi/pull/2638#issuecomment-483809925 (I'm sure in some form or another it still is). But looking at the actual code, I would have expected this case to work, since you are reading a property that you set in the constructor. Do you see the same if you use
aws.s3.BucketPolicy
instead of creating a subclass of it?
w
i'll try that now
yes, still hangs if i change the test to:
Copy code
describe("constructor", function() {
        let testBucket = new aws.s3.Bucket("test");
        let bucketPolicy = new aws.s3.BucketPolicy("test", {
            bucket: testBucket.id,
            policy: ""
        });
        it("should attach to the given bucket", function(done) {
            bucketPolicy.bucket.apply(bucketId => {
                if (bucketId == "test") {
                    done();
                } else {
                    done(new Error(`wrong bucket id ${bucketId}`))
                }
            })
        });
w
Thanks - we'll have to look deeper - opened https://github.com/pulumi/pulumi/issues/2785.
👍 1
w
thanks
Luke can you recommend a workaround for this? I'm not sure how to test this part of my code.