To determine whether or not you have the Holy Spirit, you must adhere to a certain set of beliefs which are the teachings of Jesus without compromising or manipulating them.
Let's look at the commandments Jesus was talking about in order to receive the promise of the Holy Spirit. Discern with Him because He would not forget to say what those commandments were in order to get that promise of the forever indwelling holy Ghost.
John 14:1Let not your heart be troubled:
ye believe in God, believe also in me.....6 Jesus saith unto him, I am the way, the truth, and the life: no man cometh unto the Father, but by me.... 10
Believest thou not that I am in the Father, and the Father in me? the words that I speak unto you I speak not of myself: but the Father that dwelleth in me, he doeth the works.
11 Believe me that I am in the Father, and the Father in me:
or else believe me for the very works' sake. 12 Verily, verily, I say unto you,
He that believeth on me, .....
15 If ye love me, keep my commandments. 16 And I will pray the Father, and he shall give you another Comforter, that he may abide with you for ever; 17 Even the Spirit of truth; whom the world cannot receive, because it seeth him not, neither knoweth him: but ye know him; for he dwelleth with you, and shall be in you. 18 I will not leave you comfortless: I will come to you.
25 These things have I spoken unto you, being yet present with you. 26 But the Comforter, which is the Holy Ghost, whom the Father will send in my name, he shall teach you all things, and bring all things to your remembrance, whatsoever I have said unto you.
So the commandments He is talking about in John 14:15 is the repeated commandments to believe in ( Me ) Jesus Christ in order to receive the promise of the forever indwelling Holy Ghost after Jesus had left His disciples, ascending to Heaven to prepare our Homes for us there.
Other scripture confirm.
Acts 10:43 To him give all the prophets witness, that through his name whosoever believeth in him shall receive remission of sins. 44 While Peter yet spake these words, the Holy Ghost fell on all them which heard the word. 45 And they of the circumcision which believed were astonished, as many as came with Peter, because that on the Gentiles also was poured out the gift of the Holy Ghost. ~ KJV
Before they had come forward or even confess Him, they heard the words of Peter & believed in Him for how they had received the remission of sins & the promise of the holy Ghost at their salvation.
Some have misapplied Peter's words in Acts 2 as if they were to repent from all sins &/or be water baptized before coming to Jesus Christ to be saved, but the only repentance here is to repent from unbelief by believing in Him.
Peter 2:36 Therefore let all the house of Israel know assuredly, that God hath made the same Jesus, whom ye have crucified, both Lord and Christ. 37 Now when they heard this, they were pricked in their heart, and said unto Peter and to the rest of the apostles, Men and brethren, what shall we do? 38 Then Peter said unto them, Repent, and be baptized every one of you in the name of Jesus Christ for the remission of sins, and ye shall receive the gift of the Holy Ghost. 39 For the promise is unto you, and to your children, and to all that are afar off, even as many as the Lord our God shall call.
So here were some of the Jews responsible for following the crowd in not believing in Jesus & crucifying Him & they were pricked in their hearts & so the call to repent is to repent from unbelief by believing in Him. Then when Jesus Christ is in them, then they have power to follow Him by looking to Him to help them lay aside every weight & sin daily in walking in the light in fellowship with the father & the Son.
John 1:12 But as many as received him, to them gave he power to become the sons of God, even to them that believe on his name: 13 Which were born, not of blood, nor of the will of the flesh, nor of the will of man, but of God.~ KJV
Romans 11:29 For the gifts and calling of God are without repentance. ~ KJV
Hebrews 12:1Wherefore seeing we also are compassed about with so great a cloud of witnesses, let us lay aside every weight, and the sin which doth so easily beset us, and let us run with patience the race that is set before us, 2 Looking unto Jesus the author and finisher of our faith; who for the joy that was set before him endured the cross, despising the shame, and is set down at the right hand of the throne of God.
So let us read the good report of all saved believers.
Hebrews 11:1Now faith is the substance of things hoped for, the evidence of things not seen. 2 For by it the elders obtained a good report....
Galatians 3:14 That the blessing of Abraham might come on the Gentiles through Jesus Christ; that we might receive the promise of the Spirit through faith.... 26 For ye are all the children of God by faith in Christ Jesus. ~ KJV
So the only set of commandments needed to receive the promise of the Holy Spirit at our salvation is to believe in Jesus Christ. Did you know that our believing in Jesus Christ is a work of God ALSO?
John 6:44 No man can come to me, except the Father which hath sent me draw him: and I will raise him up at the last day. ~ KJV
Matthew 11:25 At that time Jesus answered and said, I thank thee, O Father, Lord of heaven and earth, because thou hast hid these things from the wise and prudent, and hast revealed them unto babes. 26 Even so, Father: for so it seemed good in thy sight. 27 All things are delivered unto me of my Father: and no man knoweth the Son, but the Father; neither knoweth any man the Father, save the Son, and he to whomsoever the Son will reveal him. 28 Come unto me, all ye that labour and are heavy laden, and I will give you rest. 29 Take my yoke upon you, and learn of me; for I am meek and lowly in heart: and ye shall find rest unto your souls. 30 For my yoke is easy, and my burden is light.
John 3:18 He that believeth on him is not condemned: but he that believeth not is condemned already, because he hath not believed in the name of the only begotten Son of God. 19 And this is the condemnation, that light is come into the world, and men loved darkness rather than light, because their deeds were evil. 20 For every one that doeth evil hateth the light, neither cometh to the light, lest his deeds should be reproved. 21 But he that doeth truth cometh to the light, that his deeds may be made manifest, that they are wrought in God. ~ KJV
So God knows who is seeking Him from those that prefer their evil deeds rather than to come to Him to be reproved of them. The Father reveals the Son to even babes & little children as all they can do is trust the Lord at His word. Read again the requirement for salvation.
Mark 10:13 And they brought young children to him, that he should touch them: and his disciples rebuked those that brought them. 14 But when Jesus saw it, he was much displeased, and said unto them, Suffer the little children to come unto me, and forbid them not: for of such is the kingdom of God. 15 Verily I say unto you, Whosoever shall not receive the kingdom of God as a little child, he shall not enter therein. KJV
So can a child do all those commandments you seem to think they need to do before coming to Jesus to get that promise of the Holy Spirit? All I see that a child can do is take Jesus at His word by believing in Him to be saved & the fact that his believing is a work of God Himself is why saved believers everywhere should cast away all doubts about having the Holy Spirit or not when they DO believe in Jesus Christ.